import request from './config'

// 简历列表响应数据类型定义
interface ResumeReport {
  cnIsComplete: boolean
  enIsComplete: boolean
  resumeIsOpened: boolean
}

interface ResumeListItem {
  autoRefreshDate: number
  cnCanDelivery: boolean
  cnCanDeliveryReal: boolean
  cnCompleted: string
  cnFirstCompletedDate: string
  cnSource: number
  cnSourceCompleted: number
  completionFlag: number
  completionFlagReal: number
  confidentialMobile: number
  confidentialReason: string
  confidentialSetTime: number
  confidentialStatus: number
  createdDate: number
  createdType: number
  createdUserId: number
  currentEducation: string
  currentIndustry: string
  currentJobType: string
  currentSalary: string
  defaultLang: string
  disclosureLevel: string
  enCanDelivery: boolean
  enCanDeliveryReal: boolean
  enCompleted: string
  enSource: number
  enSourceCompleted: number
  existence: boolean
  isEditable: string
  isRefresh: string
  modifiedDate: number
  report: ResumeReport
  resumeId: number
  resumeName: string
  resumeNumber: string
  resumeSourceId: number
  resumeType: number
}

interface ResumeListResponse {
  code: number
  data: ResumeListItem[]
  message: string
  taskId: string
  time: string
}

// 获取简历列表
export const getResumeList = (params: { userid: number; lang: number }) => {
  return request.get<ResumeListResponse>('/resumeservicev1/listAndReport', {
    params
  })
}